home *** CD-ROM | disk | FTP | other *** search
/ Directorty Opus 5 - Magellan 2 / Opus 5 - Magellan 2.iso / Extras / DOpus511 / Update_Dopus511 < prev    next >
Text File  |  1995-06-21  |  7KB  |  270 lines

  1. ;************************************************************************
  2. ; Script to Update Directory Opus version 5 or version 5.1
  3. ; ©    Dr Greg Perry GPSoftware 20.6.95  
  4. ;     also handles German version 18/5/95 update 
  5. ;    "$VER: UpdateDopus5.11  1.1  20.5.95"
  6. ;*************************************************************************
  7. ;
  8. ;    creates temp dir as ram:updop and ram:updop/new
  9. ;    assigns DOPTMP: ram:updop
  10. ;    assigns DOPNEW: DOPTMP:new" (safe))
  11.  
  12.  
  13.  
  14. ;
  15. ; setup procedure to perform the actual patchings
  16. ;
  17.  
  18. (procedure patch ; uses FILE
  19. (set SRCFILE (tackon "DOPNEW:" FILE ))
  20. (set PATCHFILE (cat SRCFILE ".pch"))
  21. (set OLDFILE (tackon "OLDOPUS:" FILE))
  22. (set NEWFILE (tackon "DOPNEW:" FILE))
  23. (working "Patching file : "FILE )
  24.  
  25. (delete "DOPNEW:doptemp" (safe))
  26. (run "DOPTMP:spatch >NIL: <NIL: -oDOPTMP:wally "(cat "-p" PATCHFILE)" "OLDFILE)
  27. (if    (exists "DOPTMP:wally")
  28.     (rename "DOPTMP:wally" NEWFILE)
  29.     (
  30.     (if    (= HELPFILE 1)
  31.         (message "The attempted patch for the HELP file was not unsuccessful, probably an incorrect version. The current HELP file was not changed.\n\nPlease contact your local distributor or GPSoftware for information about obtaining the correct HELP file\n")
  32.         (abort "The attempted patch for file \n" OLDFILE "\n was not unsuccessful, probably an incorrect version.  Please ensure that you have an original verson of Directory Opus 5 or 5.1 installed")
  33.     )
  34.     )
  35.     
  36. )
  37. (delete PATCHFILE (safe))
  38. )
  39.  
  40. ;
  41. ; main
  42. ;
  43.  
  44. (welcome "Directory Opus 5.11 Update")
  45. (set HELPFILE 0)
  46.  
  47. ;
  48. ; assign the patch to wherever we are disk or ram: etc
  49. ;
  50.  
  51. (makeassign "Dopus511Update" "" (safe))
  52.  
  53. ;
  54. ;get our assignments
  55. ;
  56. (set DOPdest (getassign "dopus5" "a"))
  57. (set @default-dest DOPdest)
  58.  
  59.  
  60.  
  61. (makeassign "OLDOPUS" DOPdest)
  62.  
  63. (if    (<> (exists "OLDOPUS:DirectoryOpus") 1)
  64.     (abort "Directory Opus  is not in the Dopus5: directory. You must properly install Directory Opus 5.0 or 5.1 before applying this update patch.")
  65. )
  66.  
  67. ;
  68. ;Check versions installed
  69. ;
  70.  
  71. (working "Checking version of current Directory Opus...")
  72. (run "version >env:dopvers5 OLDOPUS:DirectoryOpus full ")
  73. (set DOPVER (substr (getenv "dopvers5") 15 3))
  74.  
  75. (if    (= "5.0" DOPVER)
  76.     (set VER 0)
  77.     (
  78.     (if (= "5.1" DOPVER)
  79.         (set VER 1)
  80.         (abort "You do not have the correct version "VER" of DirectoryOpus installed on your hard drive. You must have version 5.0 or 5.1 installed to use this patch.")
  81.     
  82.     )
  83.     )
  84. )
  85.  
  86. ;
  87. ;copy parts required to ram:
  88. ;
  89.  
  90. (makedir "ram:updop")
  91. (makedir "ram:updop/new")
  92.  
  93. (makeassign "DOPTMP" "ram:updop" (safe))
  94. (makeassign "DOPNEW" "DOPTMP:new" (safe))
  95.  
  96.  
  97. (copyfiles
  98.     (source "dopus511Update:")
  99.     (dest "DOPTMP:")
  100.     (pattern "(lhex|spatch)")
  101.     (nogauge)
  102.     (files)    
  103. )
  104.  
  105. ;
  106. ; which set of patch files ?
  107. ;
  108.  
  109. (if (= VER 1)    (set PCH "pch51.lha")
  110.         (set PCH "pch50.lha")
  111. )
  112.  
  113. (message"\nWe have identified that you have Directory Opus version 5."VER" installed. \n\n"
  114.     "\nAbout to update your Directory Opus 5 program and associated files and libraries to version 5.11.\n\n"
  115.     "This will take a few minutes.\n"
  116.     "Do you wish to continue the update?")
  117.  
  118.  
  119. (working "Extracting archives to patch \n Directory Opus version 5."VER"\n\n  Please wait...\n")
  120.  
  121. (run "DOPTMP:lhex >NIL: <NIL: -qfw=DOPTMP: x dopus511Update:dopus_pch.lha " PCH)
  122. (run "DOPTMP:lhex >NIL: <NIL: -qfw=DOPNEW: x " (cat "DOPTMP:" PCH))
  123. (delete (cat "DOPTMP:" PCH))
  124.  
  125. ;
  126. ;Thunderbirds are go!
  127. ;
  128.  
  129. (set FILE "DirectoryOpus") (patch)
  130. (set FILE "c/DOpusRT5") (patch)
  131. (set FILE "c/LoadDB") (patch)
  132. (set FILE "libs/dopus5.library") (patch)
  133. (set FILE "modules/about.module") (patch)
  134. (set FILE "modules/configopus.module") (patch)
  135. (set FILE "modules/diskcopy.module") (patch)
  136. (set FILE "modules/diskinfo.module") (patch)
  137. (set FILE "modules/format.module") (patch)
  138. (set FILE "modules/icon.module") (patch)
  139. (set FILE "modules/listerformat.module") (patch)
  140. (set FILE "modules/play.module") (patch)
  141. (set FILE "modules/print.module") (patch)
  142. (set FILE "modules/read.module") (patch)
  143. (set FILE "modules/show.module") (patch)
  144.  
  145.  
  146. (if    (askbool
  147.     (prompt"\nDo you wish to update the Dopus5:Help file?\n"
  148.         "\n*** WARNING ***\n\n"
  149.         "This updates the ENGLISH HELP file ONLY!\n\n"
  150.         "For the GERMAN release, select NO and contact your distributor if you need the new version. (The changes are minor.)")
  151.     (help "Contact your local distributor for details of an updated German Help and catalog files\n")
  152.     (choices "Yes" "No - Skip this")
  153.     )
  154.     (
  155.     (set HELPFILE 1)
  156.     (set FILE "help/dopus5.guide") (patch)
  157.     )
  158. )
  159.  
  160.  
  161. ;
  162. ; finally update the REAL Opus directory with the newly patched files
  163. ;
  164.  
  165. (working "Now updating your original Directory Opus Directory with the new files..\n")
  166. (copyfiles
  167.     (source "DOPNEW:")
  168.     (dest "OLDOPUS:modules")
  169.     (pattern "register.module")
  170.     (nogauge)
  171.     (files)    
  172. )
  173. (delete "DOPNEW:register.module")
  174. (copyfiles
  175.     (source "DOPNEW:")
  176.     (dest "OLDOPUS:")
  177.     (optional force)
  178.     (all)    
  179. )
  180.  
  181. ;
  182. ; check if user had Opus as WB replacement
  183. ;
  184.  
  185. (run "version >env:dopldb c:loadwb full")
  186. (set DOPVER1 (substr (getenv "dopldb") 0 6))
  187.  
  188. (if    (= "LoadDB" DOPVER1)
  189.     (copyfiles
  190.         (source "DOPNEW:c/LoadDB")
  191.         (dest "C:")
  192.         (newname "LoadWB")
  193.         (optional force)
  194.     )
  195. )
  196.  
  197.  
  198. ;
  199. ;Install the Readme file
  200. ;
  201.  
  202. (run "DOPTMP:lhex >NIL: <NIL: -qfw=OLDOPUS: x dopus511Update:dopus_pch.lha ReadMe.511")
  203.  
  204. (if    (askbool
  205.     (prompt"\nDo you wish to install the extra ARexx scripts which have "
  206.         "been contributed by Opus 5 users.\n\n"
  207.         "Please see the actual script files for further details of installation and usage.\n")
  208.     (help "none")
  209.     )
  210.     ( 
  211.         (run "DOPTMP:lhex >NIL: <NIL: -qfw=DOPTMP: x dopus511Update:dopus_pch.lha ARexx.lha")
  212.         (run "DOPTMP:lhex >NIL: <NIL: -qfw=DOPTMP: x DOPTMP:ARexx.lha")
  213.         (copyfiles
  214.             (prompt "Please select the files you wish to copy to your Dopus5:Arexx directory\n")
  215.             (help @copyfiles-help)
  216.             (source "DOPTMP:Arexx")
  217.             (dest "OLDOPUS:Arexx")
  218.             (confirm)
  219.             (all)    
  220.         )
  221.         (run "delete DOPTMP:Arexx all quiet")
  222.     )
  223. )
  224.  
  225. (if    (askbool
  226.         (prompt"\nDo you wish to Install the ARexx LhADir archive to your Opus 5 Directory?\n\n"
  227.         "The LhADir archive was developed by Edmund Vermeulen.\nIt allows you to easily handle LHA and LZH files via Directory Opus 5\n")
  228.         (help "none")
  229.     )
  230.     (
  231.     (run "DOPTMP:lhex >NIL: <NIL: -qfw=OLDOPUS: x dopus511Update:LhADirOpus5V10.lha")
  232.     (message "\nThe LhADir has been unarchived into your current Dopus5: drawer.\n"
  233.         "\nOnce you have finished the Opus 5.11 installation, please "
  234.         "open the dopus5:LhADir directory and double click on the "
  235.         "'Inslall LhADir' icon to complete the installation of LhADir\n")
  236.     )
  237. )
  238.  
  239.  
  240.  
  241. ;
  242. ;Display the ReadMe 
  243. ;
  244.  
  245. (IF (> (run "Sys:Utilities/MultiView OLDOPUS:ReadMe.511") 0)
  246.     (IF (> (run "Sys:Utilities/AmigaGuide OLDOPUS:ReadMe.511") 0)
  247.         (run "More OLDOPUS:ReadMe.511")
  248.     )
  249. )
  250.     
  251.         
  252. (message "\nAll done!\n\nDirectory Opus has now been updated to version 5.11.\nYou should now reboot your Amiga and re-register your Directory Opus to complete the installation.")
  253.  
  254.  
  255.  
  256.     
  257. ;
  258. ;clean up
  259. ;
  260.  
  261. (makeassign "DOPTMP" (safe))
  262. (makeassign "DOPNEW" (safe))
  263. (makeassign "Dopus511Update" (safe))
  264.  
  265. (run "Delete ram:updop all quiet")
  266.  
  267. (exit "Instalation script ended")
  268.  
  269.  
  270.